package hihocode;

import java.util.Scanner;

//1051 : 补提交卡
public class BuDengKa {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int testCase = scanner.nextInt();
		int n, m;
		int[] forgetDay;
		int[] continuedDay;
		for (int i = 0; i < testCase; i++) {
			n = scanner.nextInt();
			m = scanner.nextInt();
			continuedDay = new int[n + 1];
			forgetDay = new int[n];
			for (int j = 0; j < forgetDay.length; j++) {
				forgetDay[j] = scanner.nextInt();
			}
			if(n == 0){
				System.out.println(100);
				continue;
			}
			continuedDay[0] = forgetDay[0] - 1;
			for(int j = 1; j < forgetDay.length; j++){
				continuedDay[j] = forgetDay[j] - forgetDay[j - 1] - 1;
			}
			continuedDay[n] = 100 - forgetDay[n - 1];
			//如果补登卡的张数大于等于忘记登录的次数
			if(m >= n){
				System.out.println(100);
				continue;
			}
			
			//寻找连续子数组中长度为k的最大和
			getMaxSum(continuedDay, m);
		}
		scanner.close();
	}

	private static void getMaxSum(int[] continuedDay, int m) {
		int maxValue = 0;
		for(int i = 0; i < continuedDay.length; i++){
			System.out.print(continuedDay[i] + " ");
		}
		System.out.println();
//		if(m == 0){
//			System.out.println(maxValue);
//			return;
//		}
		for (int i = 0; i <= continuedDay.length - m - 1; i++) {
			int res = 0;
			for (int j = i; j < i + m + 1; j++) {
				res += continuedDay[j];
			}
			maxValue = Math.max(maxValue, res);
		}
		System.out.println(maxValue + m);
	}
}
